package com.yst.webplugin.permission;


import java.lang.annotation.*;

/**
 * annotation for permission
 */
@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Permission {

    /**
     * type of the permission
     */
     PermissionType value() default PermissionType.VIEW;

    /**
     * parent's permission
     * @return
     */
     String path() default "";


    /**
     * description for permission
     */
     String description() default "";
    /**
     * group of permission
     */
    @Target({ElementType.FIELD,ElementType.TYPE,ElementType.METHOD})
    @Retention(RetentionPolicy.RUNTIME)
    @interface Group{
         Permission[] value();
     }
}
